/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package escr.persistencia;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author Aditardo
 */
@Entity
@Table(name = "auditoria")
@NamedQueries({@NamedQuery(name = "Auditoria.findByAudCodigo", query = "SELECT a FROM Auditoria a WHERE a.audCodigo = :audCodigo"), @NamedQuery(name = "Auditoria.findByAudUsuario", query = "SELECT a FROM Auditoria a WHERE a.audUsuario = :audUsuario"), @NamedQuery(name = "Auditoria.findByAudFecIni", query = "SELECT a FROM Auditoria a WHERE a.audFecIni = :audFecIni"), @NamedQuery(name = "Auditoria.findByAudHorIni", query = "SELECT a FROM Auditoria a WHERE a.audHorIni = :audHorIni"), @NamedQuery(name = "Auditoria.findByAudFecSal", query = "SELECT a FROM Auditoria a WHERE a.audFecSal = :audFecSal"), @NamedQuery(name = "Auditoria.findByAudHorSal", query = "SELECT a FROM Auditoria a WHERE a.audHorSal = :audHorSal"), @NamedQuery(name = "Auditoria.findByAudMenu", query = "SELECT a FROM Auditoria a WHERE a.audMenu = :audMenu")})
public class Auditoria implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Column(name = "AUD_CODIGO", nullable = false)
    private Integer audCodigo;
    @Column(name = "AUD_USUARIO")
    private String audUsuario;
    @Column(name = "AUD_FEC_INI")
    @Temporal(TemporalType.DATE)
    private Date audFecIni;
    @Column(name = "AUD_HOR_INI")
    @Temporal(TemporalType.TIME)
    private Date audHorIni;
    @Column(name = "AUD_FEC_SAL")
    @Temporal(TemporalType.DATE)
    private Date audFecSal;
    @Column(name = "AUD_HOR_SAL")
    @Temporal(TemporalType.TIME)
    private Date audHorSal;
    @Column(name = "AUD_MENU")
    private Integer audMenu;

    public Auditoria() {
    }

    public Auditoria(Integer audCodigo) {
        this.audCodigo = audCodigo;
    }

    public Integer getAudCodigo() {
        return audCodigo;
    }

    public void setAudCodigo(Integer audCodigo) {
        this.audCodigo = audCodigo;
    }

    public String getAudUsuario() {
        return audUsuario;
    }

    public void setAudUsuario(String audUsuario) {
        this.audUsuario = audUsuario;
    }

    public Date getAudFecIni() {
        return audFecIni;
    }

    public void setAudFecIni(Date audFecIni) {
        this.audFecIni = audFecIni;
    }

    public Date getAudHorIni() {
        return audHorIni;
    }

    public void setAudHorIni(Date audHorIni) {
        this.audHorIni = audHorIni;
    }

    public Date getAudFecSal() {
        return audFecSal;
    }

    public void setAudFecSal(Date audFecSal) {
        this.audFecSal = audFecSal;
    }

    public Date getAudHorSal() {
        return audHorSal;
    }

    public void setAudHorSal(Date audHorSal) {
        this.audHorSal = audHorSal;
    }

    public Integer getAudMenu() {
        return audMenu;
    }

    public void setAudMenu(Integer audMenu) {
        this.audMenu = audMenu;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (audCodigo != null ? audCodigo.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Auditoria)) {
            return false;
        }
        Auditoria other = (Auditoria) object;
        if ((this.audCodigo == null && other.audCodigo != null) || (this.audCodigo != null && !this.audCodigo.equals(other.audCodigo))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "escr.persistencia.Auditoria[audCodigo=" + audCodigo + "]";
    }

}
